cmake_minimum_required(VERSION 3.0.0)
project(wxWidgetsCAD VERSION 0.1.0)

include(CTest)
enable_testing()

#设置编译时的参数
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -std=c++11 -mwindows")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
    set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -Wall -std=c++11 -mwindows")
else()
    set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -Wall -std=c++11 -mwindows")
endif()
message("编译参数:${CMAKE_CXX_FLAGS}")

#设置当前工程的include
include_directories("${PROJECT_SOURCE_DIR}/include")
#编译当前工程的所有源文件
file(GLOB SOURCES_DIR "${PROJECT_SOURCE_DIR}/src/*.cpp")
#资源
file(GLOB RES_DIR "${PROJECT_SOURCE_DIR}/resource.rc")

#wxWidgets根目录
set(WXWIDGETS_PATH "D:/cpp_libs/wxWidgets-3.0.5")
# #opencv根目录
set(OPENCV_PATH "D:/cpp_libs/opencv-4.5.2/install")

add_subdirectory(src)

